﻿using Quartz;
using System;
using System.Collections.Generic;
using System.Text;
using T.FAS.Runtime.ScheduleJob.SPI;

namespace T.FAS.Runtime.ScheduleJob.Service
{
    public class ScheduleJobKeyUtil
    {
        public static JobKey GetJobKey(string instanceID,string jobGroup)
        {
            return JobKey.Create(instanceID, jobGroup);
        }
        public static JobKey GetJobKey(ScheduleJobInstance instance)
        {
            return JobKey.Create(instance.ID,instance.ScheduleJobID+instance.ScheduleJobGroup);
        }
        public static TriggerKey GetTriggerKey(ScheduleJobInstance instance)
        {
            return new TriggerKey(instance.ID, instance.ScheduleJobID + instance.ScheduleJobGroup);
        }
    }
}
